package com.itheima.mall.service.oms;


import com.itheima.mall.api.oms.ReturnReasonApi;
import com.itheima.mall.pojo.oms.OmsOrderReturnReason;
import com.itheima.mall.vo.PageResult;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class OrderReturnReasonService {
    @DubboReference
    private ReturnReasonApi returnReasonApi;

    public void createReason(OmsOrderReturnReason omsOrderReturnReason) {
        returnReasonApi.createReason(omsOrderReturnReason);
    }

    public void deleteReason(Integer[] ids) {
        returnReasonApi.deleteReason(ids);
    }

    public PageResult findReason(Integer pageNum, Integer pageSize) {
        return returnReasonApi.findReason(pageNum,pageSize);
    }

    public void updateStatus(Integer[] ids, Integer status) {
        returnReasonApi.updateStatus(ids,status);
    }

    public void updateReason(OmsOrderReturnReason omsOrderReturnReason,Integer id) {
        returnReasonApi.updateReason(omsOrderReturnReason,id);
    }


    public OmsOrderReturnReason getOneReason(Integer id) {
        return returnReasonApi.getOneReason(id);
    }
}
